← Index
NYTProf Performance Profile   
For ../prof.pl
  Run on Thu Dec 15 15:23:56 2022
Reported on Thu Dec 15 15:27:04 2022

Filename(eval 436)[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm:3]
StatementsExecuted 56 statements in 1.03ms
Eval Invoked At/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/Sub/Quote.pm line 3
Sibling evals1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
222100µs12.2msJSON::Schema::Modern::Result::::newJSON::Schema::Modern::Result::new
11131µs139µsJSON::Schema::Modern::Result::::BEGIN@15.337JSON::Schema::Modern::Result::BEGIN@15.337
11117µs23µsJSON::Schema::Modern::Result::::BEGIN@139JSON::Schema::Modern::Result::BEGIN@139
11113µs13µsJSON::Schema::Modern::Result::::BEGIN@20.338JSON::Schema::Modern::Result::BEGIN@20.338
1116µs27µsJSON::Schema::Modern::Result::::BEGIN@75JSON::Schema::Modern::Result::BEGIN@75
1115µs13µsJSON::Schema::Modern::Result::::BEGIN@123JSON::Schema::Modern::Result::BEGIN@123
1115µs12µsJSON::Schema::Modern::Result::::BEGIN@99JSON::Schema::Modern::Result::BEGIN@99
1114µs14µsJSON::Schema::Modern::Result::::BEGIN@163JSON::Schema::Modern::Result::BEGIN@163
1112µs10µsJSON::Schema::Modern::Result::::BEGIN@131JSON::Schema::Modern::Result::BEGIN@131
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1{
222µs my $coerce_for_exception = ${$_[1]->{"\$coerce_for_exception"}};
310s my $_QUOTED = ${$_[1]->{"\$_QUOTED"}};
411µs my $isa_check_for_valid = ${$_[1]->{"\$isa_check_for_valid"}};
510s my $isa_check_for_annotations = ${$_[1]->{"\$isa_check_for_annotations"}};
610s my $isa_check_for_exception = ${$_[1]->{"\$isa_check_for_exception"}};
710s my $isa_check_for_formatted_5fannotations = ${$_[1]->{"\$isa_check_for_formatted_5fannotations"}};
810s my $coerce_for_annotations = ${$_[1]->{"\$coerce_for_annotations"}};
911µs my $coerce_for_errors = ${$_[1]->{"\$coerce_for_errors"}};
1010s my $_UNQUOTED = ${$_[1]->{"\$_UNQUOTED"}};
1110s my $isa_check_for_output_5fformat = ${$_[1]->{"\$isa_check_for_output_5fformat"}};
1210s my $isa_check_for_errors = ${$_[1]->{"\$isa_check_for_errors"}};
1310s my $coerce_for_valid = ${$_[1]->{"\$coerce_for_valid"}};
14 package JSON::Schema::Modern::Result;
15268µs2247µs
# spent 139µs (31+108) within JSON::Schema::Modern::Result::BEGIN@15.337 which was called: # once (31µs+108µs) by Sub::Quote::_clean_eval at line 15
no warnings 'closure';
# spent 139µs making 1 call to JSON::Schema::Modern::Result::BEGIN@15.337 # spent 108µs making 1 call to warnings::unimport
16
# spent 12.2ms (100µs+12.1) within JSON::Schema::Modern::Result::new which was called 2 times, avg 6.10ms/call: # once (33µs+9.01ms) by JSON::Schema::Modern::evaluate at line 398 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm # once (67µs+3.08ms) by JSON::Schema::Modern::evaluate at line 177 of Sub/Defer.pm
sub new {
17 ($_QUOTED,$_UNQUOTED) if 0;
18# BEGIN quote_sub PRELUDE
19package JSON::Schema::Modern::Result;
20
# spent 13µs within JSON::Schema::Modern::Result::BEGIN@20.338 which was called: # once (13µs+0s) by Sub::Quote::_clean_eval at line 25
BEGIN {
2112µs $^H = 2018;
2210s ${^WARNING_BITS} = "UUUUUUUUUUUUUUUUUUUU";
2315µs %^H = (
24 );
251262µs113µs}
# spent 13µs making 1 call to JSON::Schema::Modern::Result::BEGIN@20.338
26# END quote_sub PRELUDE
2711µs my $invoker = CORE::shift();
2810s my $class = CORE::ref($invoker) ? CORE::ref($invoker) : $invoker;
2910s if ($class ne "JSON::Schema::Modern::Result") {
30 if ($Moo::MAKERS{$class}) {
31 if ($Moo::MAKERS{$class}{constructor}) {
32 package JSON::Schema::Modern::Result;
33 return $invoker->SUPER::new(@_);
34 }
35 Moo->_constructor_maker_for($class);
36 return $invoker->new(@_);
37 } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) {
38 return $meta->new_object(
39 $class->can("BUILDARGS") ? $class->BUILDARGS(@_)
40 : $class->Moo::Object::BUILDARGS(@_)
41 );
42 }
43 }
44 my $args = scalar @_ == 1
45 ? CORE::ref $_[0] eq 'HASH'
4612µs ? { %{ $_[0] } }
47 : Carp::croak("Single parameters to new() must be a HASH ref"
48 . " data => ". $_[0])
49 : @_ % 2
50 ? Carp::croak("The new() method for $class expects a hash reference or a"
51 . " key/value list. You passed an odd number of arguments")
52 : {@_}
53 ;
5411µs my $new = bless({}, $class);;
55(exists $args->{"annotations"} and ($new->{"annotations"} = scalar do { my $value = do {
56 local $Method::Generate::Accessor::CurrentAttribute = {
57 init_arg => "annotations",
58 name => "annotations",
59 step => "coercion",
60 };
61 (my $_return),
62 (my $_error), (my $_old_error = $@);
63 (eval {
64 ($@ = $_old_error),
65 ($_return =
66$coerce_for_annotations->($args->{"annotations"})),
67 1
68 } or
69 $_error = CORE::ref $@ ? $@ : "coercion for \"annotations\" failed: ".$@);
70 ($@ = $_old_error),
71 (defined $_error and CORE::die $_error);
72 $_return;
73}
74;
752147µs248µs
# spent 27µs (6+21) within JSON::Schema::Modern::Result::BEGIN@75 which was called: # once (6µs+21µs) by Sub::Quote::_clean_eval at line 75
(do { no warnings "void"; package Type::Tiny; (do { package Type::Tiny; (Ref::Util::XS::is_plain_arrayref($value)) and do { my $ok = 1; for my $i (@{$value}) { ($ok = 0, last) unless (Scalar::Util::blessed($i) and $i->isa(q[JSON::Schema::Modern::Annotation])) }; $ok } }) or Type::Tiny::_failed_check($isa_check_for_annotations, "ArrayRef[InstanceOf[\"JSON::Schema::Modern::Annotation\"]]", $value, "attribute_name","annotations","attribute_step","isa check","mgaca","0","varname","\$args->{\"annotations\"}"); $value }),
# spent 27µs making 1 call to JSON::Schema::Modern::Result::BEGIN@75 # spent 21µs making 1 call to warnings::unimport
76 $value
77}
78)),
79(exists $args->{"errors"} and ($new->{"errors"} = scalar do { my $value = do {
80 local $Method::Generate::Accessor::CurrentAttribute = {
81 init_arg => "errors",
82 name => "errors",
83 step => "coercion",
84 };
85 (my $_return),
86 (my $_error), (my $_old_error = $@);
87 (eval {
88 ($@ = $_old_error),
89 ($_return =
90$coerce_for_errors->($args->{"errors"})),
91 1
92 } or
93 $_error = CORE::ref $@ ? $@ : "coercion for \"errors\" failed: ".$@);
94 ($@ = $_old_error),
95 (defined $_error and CORE::die $_error);
96 $_return;
97}
98;
99296µs219µs
# spent 12µs (5+7) within JSON::Schema::Modern::Result::BEGIN@99 which was called: # once (5µs+7µs) by Sub::Quote::_clean_eval at line 99
(do { no warnings "void"; package Type::Tiny; (do { package Type::Tiny; (Ref::Util::XS::is_plain_arrayref($value)) and do { my $ok = 1; for my $i (@{$value}) { ($ok = 0, last) unless (Scalar::Util::blessed($i) and $i->isa(q[JSON::Schema::Modern::Error])) }; $ok } }) or Type::Tiny::_failed_check($isa_check_for_errors, "ArrayRef[InstanceOf[\"JSON::Schema::Modern::Error\"]]", $value, "attribute_name","errors","attribute_step","isa check","mgaca","0","varname","\$args->{\"errors\"}"); $value }),
# spent 12µs making 1 call to JSON::Schema::Modern::Result::BEGIN@99 # spent 7µs making 1 call to warnings::unimport
100 $value
101}
102)),
103(exists $args->{"exception"} and ($new->{"exception"} = scalar do { my $value = do {
104 local $Method::Generate::Accessor::CurrentAttribute = {
105 init_arg => "exception",
106 name => "exception",
107 step => "coercion",
108 };
109 (my $_return),
110 (my $_error), (my $_old_error = $@);
111 (eval {
112 ($@ = $_old_error),
113 ($_return =
114$coerce_for_exception->($args->{"exception"})),
115 1
116 } or
117 $_error = CORE::ref $@ ? $@ : "coercion for \"exception\" failed: ".$@);
118 ($@ = $_old_error),
119 (defined $_error and CORE::die $_error);
120 $_return;
121}
122;
123247µs221µs
# spent 13µs (5+8) within JSON::Schema::Modern::Result::BEGIN@123 which was called: # once (5µs+8µs) by Sub::Quote::_clean_eval at line 123
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[JSON::PP::Boolean]))) or Type::Tiny::_failed_check($isa_check_for_exception, "InstanceOf[\"JSON::PP::Boolean\"]", $value, "attribute_name","exception","attribute_step","isa check","mgaca","0","varname","\$args->{\"exception\"}"); $value }),
# spent 13µs making 1 call to JSON::Schema::Modern::Result::BEGIN@123 # spent 8µs making 1 call to warnings::unimport
124 $value
125}
126)),
127($new->{"formatted_annotations"} = scalar do { my $value = (
128 exists $args->{"formatted_annotations"}
12910s ? $args->{"formatted_annotations"}
130 : 1);
131547µs218µs
# spent 10µs (2+8) within JSON::Schema::Modern::Result::BEGIN@131 which was called: # once (2µs+8µs) by Sub::Quote::_clean_eval at line 131
(do { no warnings "void"; package Type::Tiny; ((!ref $value and (!defined $value or $value eq q() or $value eq '0' or $value eq '1'))) or Type::Tiny::_failed_check($isa_check_for_formatted_5fannotations, "Bool", $value, "attribute_name","formatted_annotations","attribute_step","isa check","mgaca","0","varname","\$args->{\"formatted_annotations\"}"); $value }),
# spent 10µs making 1 call to JSON::Schema::Modern::Result::BEGIN@131 # spent 8µs making 1 call to warnings::unimport
132 $value
133}
134),
135($new->{"output_format"} = scalar do { my $value = (
136 exists $args->{"output_format"}
13710s ? $args->{"output_format"}
138 : "basic");
1395132µs332µs
# spent 23µs (17+6) within JSON::Schema::Modern::Result::BEGIN@139 which was called: # once (17µs+6µs) by Sub::Quote::_clean_eval at line 139
(do { no warnings "void"; package Type::Tiny; ((defined($value) and !ref($value) and $value =~ m{\A(?:(?:basic|d(?:ata_only|etailed)|flag|strict_basic|terse|verbose))\z})) or Type::Tiny::_failed_check($isa_check_for_output_5fformat, "Enum[\"flag\",\"basic\",\"strict_basic\",\"detailed\",\"verbose\",\"terse\",\"data_only\"]", $value, "attribute_name","output_format","attribute_step","isa check","mgaca","0","varname","\$args->{\"output_format\"}"); $value }),
# spent 23µs making 1 call to JSON::Schema::Modern::Result::BEGIN@139 # spent 6µs making 1 call to warnings::unimport # spent 3µs making 1 call to Type::Tiny::CORE:match
140 $value
141}
142),
14310s(exists $args->{"valid"} and ($new->{"valid"} = scalar do { my $value = do {
14412µs local $Method::Generate::Accessor::CurrentAttribute = {
145 init_arg => "valid",
146 name => "valid",
147 step => "coercion",
148 };
14911µs (my $_return),
150 (my $_error), (my $_old_error = $@);
15110s (eval {
152 ($@ = $_old_error),
153 ($_return =
154113µs130µs$coerce_for_valid->($args->{"valid"})),
155 1
156 } or
157 $_error = CORE::ref $@ ? $@ : "coercion for \"valid\" failed: ".$@);
15811µs ($@ = $_old_error),
159 (defined $_error and CORE::die $_error);
16011µs $_return;
161}
162;
1635154µs426µs
# spent 14µs (4+10) within JSON::Schema::Modern::Result::BEGIN@163 which was called: # once (4µs+10µs) by Sub::Quote::_clean_eval at line 163
(do { no warnings "void"; package Type::Tiny; ((Scalar::Util::blessed($value) and $value->isa(q[JSON::PP::Boolean]))) or Type::Tiny::_failed_check($isa_check_for_valid, "InstanceOf[\"JSON::PP::Boolean\"]", $value, "attribute_name","valid","attribute_step","isa check","mgaca","0","varname","\$args->{\"valid\"}"); $value }),
# spent 14µs making 1 call to JSON::Schema::Modern::Result::BEGIN@163 # spent 10µs making 1 call to warnings::unimport # spent 1µs making 1 call to Scalar::Util::blessed # spent 1µs making 1 call to UNIVERSAL::isa
164 $value
165}
166)),
167 (($args)[0]->{__no_BUILD__} or (
168138µs13.05ms $new->JSON::Schema::Modern::Result::BUILD($args),
# spent 3.05ms making 1 call to JSON::Schema::Modern::Result::BUILD
169 )),
170 return $new;
171 }
17211µs $$_UNQUOTED = \&new;
173}
17416µs1;
175
176;